package com.cloud.servlet;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cloud.core.BaseServlet;
import com.cloud.util.Code;

/**
 * 1Cloud1
 * @author Administrator
 * @since 2015-12-10
 * @version 1.0 
 */
@Controller
@RequestMapping("/index")
public class IndexServlet extends BaseServlet {
	
	@RequestMapping(value = "/err", method = { RequestMethod.GET, RequestMethod.POST})
	public @ResponseBody Object err(HttpServletRequest request) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("code", Code.C500.key);
		map.put("msg", Code.C500.desc);
		return map;
	}
}
